home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 151-175 / scopedisk168 / asmmacros / am_02 / parentdir.i < prev    next >
Text File  |  1995-03-19  |  1KB  |  48 lines

  1.      NOLIST
  2. ParentDir   MACRO              ; 15 Sept 88
  3. *------------------------------; Start of ParentDir macro.
  4.      NOLIST
  5.      IFEQ NARG-2               ; If <FileLockName> is given, then
  6.      LIST
  7.                                ; Get the file lock from <FileLockName>.
  8.      NOLIST
  9.      IFEQ ReEntrant-1
  10.      LIST
  11.      MOVE.L \2(A5),D1
  12.      NOLIST
  13.      ENDC
  14.      IFNE ReEntrant-1
  15.      LIST
  16.      MOVE.L \2,D1
  17.      NOLIST
  18.      ENDC
  19.      ENDC
  20.      IFEQ NARG-1               ; If <FileLockName> is not given, then
  21.      LIST
  22.      MOVE.L D0,D1              ; Use the file lock given in D0.
  23.      NOLIST
  24.      ENDC
  25.      LIST
  26.      CallLib ParentDir,dos     ; Call ParentDir.
  27.                                ; Save the parent directory lock at the named
  28.                                ;  location.
  29.      NOLIST
  30.      IFEQ ReEntrant-1
  31.      LIST
  32.      DefDS \1,1
  33.      MOVE.L D0,\1(A5)
  34.      NOLIST
  35.      ENDC
  36.      IFNE ReEntrant-1
  37.      LIST
  38.      DS_BSS \1,1,.L
  39.      MOVE.L D0,\1
  40.      NOLIST
  41.      ENDC
  42.      LIST
  43.      TST.L D0                  ; Make the zero flag indicate if parent dir
  44.                                ;  was the root.
  45. *------------------------------; End of ParentDir macro.
  46.      ENDM
  47.      LIST
  48.